gdk: Allow GdkDrawContext with a %NULL surface
authorBenjamin Otte <otte@redhat.com>
Sun, 4 Jul 2021 00:43:49 +0000 (02:43 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Jul 2021 14:23:56 +0000 (16:23 +0200)
commit01e9fa9adb8184a778ed70e41f2dbfe9049b83d5
tree0f777977514cdcd744e516e36f87b7edc6e99c50
parent581e01b2daab5b581ab80d54e154d352b6a5bbb1
gdk: Allow GdkDrawContext with a %NULL surface

This is not used yet, but it allows surfaceless GL contexts.

For that purpose, we need to make the display a construct-only property,
so that it can be set when the surface isn't.

This adds a bunch of very picky checks in the constructor so nothing bad
can happen.
gdk/gdkdrawcontext.c